package ch.fusun.baron.map.api;

import ch.fusun.baron.core.injection.Inject;
import ch.fusun.baron.data.DataUpdate;
import ch.fusun.baron.map.GameMap;

/**
 * Update class for {@link GameMap}
 */
public class GameMapUpdate implements DataUpdate {
	@Inject
	private transient GameMapService service;
	private final int width;
	private final int height;

	/**
	 * Constructor
	 */
	public GameMapUpdate() {
		this.width = 0;
		this.height = 0;
	}

	/**
	 * Constructor
	 * 
	 * @param width
	 * @param height
	 */
	public GameMapUpdate(int width, int height) {
		this.width = width;
		this.height = height;
	}

	@Override
	public void update() {
		service.configure(this.width, this.height);
	}
}
